# _*_ coding:utf-8 _*_
# _*_ by:zizle     _*_
# _*_ at:20230415  _*_

from fastapi import APIRouter
from response import APIResponse

from .common import common_router
from .calculate import calculate_router
from .datlib import datlib_router
from .datalib_flex import datalib_flex_router
from .user import user_router
from .quote import quote_router
from .infor import infor_router
from .admin import admin_router
from .media import media_router
from .ex_doctor import ex_doctor_router
from .suggest import suggest_router
from .futures_tool import futures_tool_router

v1_api_router = APIRouter()


@v1_api_router.get('/')
def index():
    return Index().index()


v1_api_router.include_router(calculate_router, prefix='/calculate')
v1_api_router.include_router(common_router, prefix='/common')
v1_api_router.include_router(admin_router, prefix='/admin')
v1_api_router.include_router(datlib_router, prefix='/datlib')
v1_api_router.include_router(datalib_flex_router, prefix='/datlibFlex')
v1_api_router.include_router(ex_doctor_router, prefix='/exDoctor')
v1_api_router.include_router(futures_tool_router, prefix='/ftools')
v1_api_router.include_router(infor_router, prefix='/infor')
v1_api_router.include_router(media_router, prefix='/media')
v1_api_router.include_router(quote_router, prefix='/quote')
v1_api_router.include_router(suggest_router, prefix='/suggest')
v1_api_router.include_router(user_router, prefix='/user')


class Index:
    def __init__(self):
        self.msg = '欢迎使用瑞智系统V2.0'

    def index(self):
        return APIResponse.success(msg=self.msg)